{% extends "base.html" %}
{% load static %}

{% block title %}{{ actor.name }} | 详情页 {% endblock %}

{% block css %}
    <link rel="stylesheet" href="{% static 'css/actors/detail.css' %}">
    <style>
        .header {
            background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)),
            url('{{ actor.avatar.url }}') center/cover no-repeat;
        }
    </style>
{% endblock %}

{% block content %}
    <div class="actor-detail-container">
        <!-- 个人信息  -->
        <div class="header">
            <div class="header-content">
                <img src="{{ actor.avatar.url }}" alt="{{ actor.name }}" class="actor-photo">
                <h1 class="actor-name">{{ actor.name }}</h1>
                <div class="actor-alias">{{ actor.details_actor.roma }}</div>
                <div class="quick-info">
                    <div class="info-item">
                        <span class="info-label">出生日期</span>
                        <span class="info-value">{{ actor.birthday }}</span>
                    </div>
                    <div class="info-item">
                        <span class="info-label">身高</span>
                        <span class="info-value">162cm</span>
                    </div>

                    {% if actor.gender == 2 %}
                        <div class="info-item">
                            <span class="info-label">三围</span>
                            <span class="info-value">{{ actor.details_actor.bust }}-{{ actor.details_actor.waist }}-{{ actor.details_actor.hip }}</span>
                        </div>
                        <div class="info-item">
                            <span class="info-label">罩杯</span>
                            <span class="info-value">{{ actor.details_actor.cups }}</span>
                        </div>
                    {% endif %}

                    <div class="info-item">
                        <span class="info-label">出生地</span>
                        <span class="info-value">{{ actor.details_actor.birth_place }}</span>
                    </div>
                    <div class="info-item">
                        <span class="info-label">血型</span>
                        <span class="info-value">O型</span>
                    </div>

                    <div class="info-item">
                        <span class="info-label">评分</span>
                        <span class="info-value">{{ actor.score }}</span>
                    </div>


                </div>
            </div>
        </div>

        {% if actor.details_actor.profile %}
            <!-- 个人简介模块 -->
            <div class="section-container">
                <div class="card">
                    <div class="card-header">
                        <h2 class="section-title">个人简介</h2>
                    </div>
                    <div class="card-content">
                        <div class="content-block">
                            <p>{{ actor.details_actor.profile|linebreaks }}</p>
                        </div>
                    </div>
                </div>
            </div>
        {% endif %}

        <!-- 演艺经历模块 -->
        {% if actor.details_actor.experience %}
            <div class="section-container">
                <div class="card">
                    <div class="card-header">
                        <h2 class="section-title">演艺经历</h2>
                    </div>
                    <div class="card-content">
                        <div class="timeline">
                            {% for career in actor.details_actor.get_experience %}
                                <div class="timeline-item">
                                    <div class="timeline-date">{{ career.year }}</div>

                                    <p>{{ career.description }}</p>
                                </div>
                            {% endfor %}

                        </div>
                    </div>
                </div>
            </div>
        {% endif %}

        <!-- 获奖记录模块 -->
        {#        <div class="section-container">#}
        {#            <div class="card">#}
        {#                <div class="card-header">#}
        {#                    <h2 class="section-title">获奖记录</h2>#}
        {#                </div>#}
        {#                <div class="card-content">#}
        {#                    <div class="timeline">#}
        {#                        <div class="timeline-item">#}
        {#                            <div class="timeline-date">2016年</div>#}
        {#                            <p>第38届日本电影金像奖 - 最佳新人奖提名</p>#}
        {#                        </div>#}
        {#                        <div class="timeline-item">#}
        {#                            <div class="timeline-date">2018年</div>#}
        {#                            <p>东京电视剧大奖 - 最佳女演员奖</p>#}
        {#                        </div>#}
        {#                        <div class="timeline-item">#}
        {#                            <div class="timeline-date">2019年</div>#}
        {#                            <p>第42届日剧学院赏 - 最佳女配角奖</p>#}
        {#                        </div>#}
        {#                        <div class="timeline-item">#}
        {#                            <div class="timeline-date">2021年</div>#}
        {#                            <p>东京国际短片电影节 - 评审团特别奖</p>#}
        {#                        </div>#}
        {#                    </div>#}
        {#                </div>#}
        {#            </div>#}
        {#        </div>#}

        <!-- 代表作品模块 -->
        <div class="section-container works-section">
            <div class="card">
                <div class="card-header">
                    <h2 class="section-title">代表作品</h2>
                    <a href="{% url 'actorAllFilms' actor.id %}" class="view-all-works">
                        查看所有作品 <i class="fas fa-arrow-right"></i>
                    </a>
                </div>
                <div class="card-content">
                    {% for work in work_films_list %}
                        <a href="{% url 'movesDetails' work.id %}">
                            <div class="work-item">
                                <img src="{{ work.poster }}" alt="作品海报" class="work-poster">
                                <div class="work-info">
                                    <h3 class="work-title">{{ work.num }}</h3>
                                    <div class="work-year">{{ work.year }}</div>
                                    <p>评分: {{ work.rating }} | {{ work.title }}</p>
                                </div>
                            </div>
                        </a>
                    {% endfor %}

                </div>
            </div>
        </div>
        <!-- 推荐演员模块 -->
        <div class="section-container">
            <div class="card">
                <div class="card-header">
                    <h2 class="section-title">你可能也喜欢</h2>
                </div>
                <div class="card-content">
                    <div class="recommended-actors">
                        {% for related in related_actors %}
                            <div class="actor-card">
                                <a href="{% url 'actorDetailInfo' related.id %}">
                                    <img src="{{ related.avatar.url }}" alt="演员照片" class="actor-thumb">
                                </a>
                                <div class="actor-info">
                                    <div class="actor-name-small">{{ related.name }}</div>
                                </div>
                            </div>
                        {% endfor %}
                    </div>
                </div>
            </div>
        </div>

    </div>


{% endblock %}